/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package userBean;

import java.util.Date;

/**
 *
 * @author Rigsby Chi
 */
public class PurchaseRecord {
    protected String recordID;
    protected String movieName;
    protected String purchaseTime;
    protected String slotID;
    protected int amount;
    protected int totalPrice;
    protected int usedLoyaltyPoint;
    protected int state; //0 for unpaid, 1 for paid, 2 timeout, 3 for waiting refund, 4 for refunded
    
//    public PurchaseRecord(String movieName, Date purchaseTime, int amount, int totalPrice, int usedLoyaltyPoint){
//        setMovieName(movieName);
//        setPurchaseTime(purchaseTime);
//        setAmount(amount);
//        setTotalPrice(totalPrice);
//        setUsedLoyaltyPoint(usedLoyaltyPoint);
//    }
    
    public void setRecordID(String recordID){
        this.recordID = recordID;
    }
    
    public String getRecordID(){
        return this.recordID;
    }
    
    public void setSlotID(String slotID){
        this.slotID = slotID;
    }
    
    public String getSlotID(){
        return this.slotID;
    }
    
    public void setMovieName(String movieName){
        this.movieName = movieName;
    }
    
    public String getMovieName(){
        return this.movieName;
    }
    
    public void setPurchaseTime(String purchaseTime){
        this.purchaseTime = purchaseTime;
    }
    
    public String getPurchaseTime(){
        return this.purchaseTime;
    }
    
    public void setAmount(int amount){
        this.amount = amount;
    }
    
    public int getAmount(){
        return this.amount;
    }
    
    public void setTotalPrice(int totalPrice){
        this.totalPrice = totalPrice;
    }
    
    public int getTotalPrice(){
        return this.totalPrice;
    }
    
    public void setUsedLoyaltyPoint(int usedLoyaltyPoint){
        this.usedLoyaltyPoint = usedLoyaltyPoint;
    }
    
    public int getUsedLoyaltyPoint(){
        return this.usedLoyaltyPoint;
    }
    
    public void setState(int state){
        this.state = state;
    }
    
    public String getState(){
        if(state==0)
            return "Unpaid";
        else if(state==1)
            return "Paid";
        else if(state==2)
            return "Payment timeout";
        else if(state==3)
            return "Waiting refund";
        else if(state==4)
            return "Refunded";
        else
            return "Refunded";
    }
}